export const baseURL="http://124.93.196.45:10001/"
export const request=(Option)=>{
	// console.log(uni.getStorageSync('token'))
	return new Promise((resolve,reject)=>{
		uni.request({
			url: baseURL+Option.url,
			method: Option.method || 'get',
			data: Option.data || {},
			header:{
				'Authorization':uni.getStorageSync('token') || ""
			},
			success: res => {
				resolve(res)
				// if(res.data.code==200){
				// 	resolve(res.data.data)
				// }else{
				// 	if(res.data.code==401){
						
				// 	}
				// }reject(res.data.msg)
			},
			fail: (err) => {
				console.log(err)
			},
			complete: () => {}
		});
	})
}